(global.webpackJsonp = global.webpackJsonp || []).push([ [ "subpages/pages/invoice/invoice" ], {
    "2b10": function(t, e, n) {
        n.r(e);
        var i = n("be91"), o = n.n(i);
        for (var a in i) "default" !== a && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(a);
        e.default = o.a;
    },
    "44f5": function(t, e, n) {
        (function(t) {
            n("98af"), i(n("66fd"));
            var e = i(n("c285"));
            function i(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, t(e.default);
        }).call(this, n("543d").createPage);
    },
    "4e07": function(t, e, n) {
        n.d(e, "b", function() {
            return i;
        }), n.d(e, "c", function() {
            return o;
        }), n.d(e, "a", function() {});
        var i = function() {
            this.$createElement, this._self._c;
        }, o = [];
    },
    be91: function(t, e, n) {
        (function(t) {
            function i(t) {
                return function(t) {
                    if (Array.isArray(t)) return o(t);
                }(t) || function(t) {
                    if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
                }(t) || function(t, e) {
                    if (t) {
                        if ("string" == typeof t) return o(t, e);
                        var n = Object.prototype.toString.call(t).slice(8, -1);
                        return "Object" === n && t.constructor && (n = t.constructor.name), "Map" === n || "Set" === n ? Array.from(t) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? o(t, e) : void 0;
                    }
                }(t) || function() {
                    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }();
            }
            function o(t, e) {
                (null == e || e > t.length) && (e = t.length);
                for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n];
                return i;
            }
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var a = {
                components: {
                    hansTabber: function() {
                        n.e("subpages/components/hans-tabbar/hans-tabbar").then(function() {
                            return resolve(n("ddff"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    invoking: function() {
                        n.e("subpages/pages/invoice/components/Invoicing").then(function() {
                            return resolve(n("0664"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    invoiced: function() {
                        n.e("subpages/pages/invoice/components/Invoiced").then(function() {
                            return resolve(n("463c"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    invoicemanger: function() {
                        n.e("subpages/pages/invoice/components/Invoicemanger").then(function() {
                            return resolve(n("a46c"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                data: function() {
                    return {
                        orderList: [],
                        currentIndex: 0,
                        bottomHeight: 60,
                        mailNo: "",
                        list: [ {
                            text: "开票",
                            iconPath: "/subpages/static/image_tabbar/kaipiao.png",
                            selectedIconPath: "/subpages/static/image_tabbar/kaipiao-select.png"
                        }, {
                            text: "开票历史",
                            iconPath: "/subpages/static/image_tabbar/lishi.png",
                            selectedIconPath: "/subpages/static/image_tabbar/lishi-select.png"
                        }, {
                            text: "抬头管理",
                            iconPath: "/subpages/static/image_tabbar/manager.png",
                            selectedIconPath: "/subpages/static/image_tabbar/manager-select.png"
                        } ]
                    };
                },
                onLoad: function() {
                    this.get_component_height();
                },
                onShow: function() {
                    this.loadRes();
                },
                onPullDownRefresh: function() {
                    this.loadRes();
                },
                onReachBottom: function() {
                    this.$db.get("userToken") && (this.page++, this.loadRes(!1));
                },
                methods: {
                    topSelect: function(t) {
                        this.mailNo = t, this.loadRes();
                    },
                    refreshList: function() {
                        this.loadRes();
                    },
                    loadRes: function() {
                        var t = this, e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
                        e && (this.page = 1, this.dataSource = []), this.$db.get("userToken") && (0 == this.currentIndex && this.$api.getCanList({
                            page: this.page,
                            limit: 5,
                            mailNo: this.mailNo
                        }, function(n) {
                            t.listHandle(n, e);
                        }), 1 == this.currentIndex && this.$api.getInvoicehis({
                            page: this.page,
                            limit: 5
                        }, function(n) {
                            t.listHandle(n, e);
                        }), 2 == this.currentIndex && this.$api.getInvoiceTit({
                            page: this.page,
                            limit: 5
                        }, function(n) {
                            t.listHandle(n, e);
                        }));
                    },
                    listHandle: function(e) {
                        var n = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
                        if ("1" == e.code) {
                            t.stopPullDownRefresh();
                            var o = e.data, a = o.list, r = void 0 === a ? [] : a;
                            o.Jicount, o.Shcount, this.orderList = n ? i(r) : [].concat(i(this.orderList), i(r)), 
                            this.page > 1 && 0 === r.length && (this.$common.errorToShow("已加载全部数据"), this.page--);
                        } else this.$common.errorToShow(e.msg);
                    },
                    tabChange: function(e) {
                        this.currentIndex = e, this.loadRes(), 0 == e && t.setNavigationBarTitle({
                            title: "申请发票"
                        }), 1 == e && t.setNavigationBarTitle({
                            title: "开票历史"
                        }), 2 == e && t.setNavigationBarTitle({
                            title: "抬头管理"
                        });
                    },
                    get_component_height: function() {
                        var e = this;
                        t.getSystemInfo({
                            success: function(n) {
                                t.createSelectorQuery().in(e).select(".bottom-tabbar").boundingClientRect(function(t) {
                                    t && (e.bottomHeight = Math.round(t.height));
                                }).exec();
                            }
                        });
                    }
                }
            };
            e.default = a;
        }).call(this, n("543d").default);
    },
    c285: function(t, e, n) {
        n.r(e);
        var i = n("4e07"), o = n("2b10");
        for (var a in o) "default" !== a && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(a);
        var r = n("f0c5"), c = Object(r.a)(o.default, i.b, i.c, !1, null, "1f9d7568", null, !1, i.a, void 0);
        e.default = c.exports;
    }
}, [ [ "44f5", "common/runtime", "common/vendor" ] ] ]);